package dao;

import java.util.List;

import entityJPA.Candidate;

/**
 * 
 * This interface defines the common methods for
 * JDBCCandidateDAO and JPACandidateDAO classes.
 *
 */
public interface ICandidateDAO {
	
	/**
	 * Inserts into database a new candidate.       
	 * @param candidate      
	 */
	public void insertCandidate(Candidate canditate);
	
	/**
	 * Updates a candidate in database.
	 * @param candidate        
	 */  
	public void updateCandidate(Candidate candidate);
	
	/**
	 * Deletes a candidate from database.
	 * @param candidate
	 */
	public void deleteCandidate(Candidate candidate);
	
	/**
	 * Finds a specific candidate given the primary key.
	 * @param idCandidate
	 * @return a Candidate instance which has the same idCandidate
	 */
	public Candidate findById(int idCandidate);
	
	/**
	 * Finds all candidates in database.
	 * @return List<Candidate>
	 */
	public List<Candidate> findAll();

	

}
